 Public Class SQLDto 
 Inherits KetNoiDto
 #Region "Attributes"
 #End Region
 #Region "Property"
 #End Region
 #Region "Contructor"
 Public Sub New()
 _Server = "localhost"
 _Database = ""
 _Username ="sa"
 _Pass = ""
 MsSql = Class_KieuDL.sql 
 End Sub
 Public Sub New(ByVal StrServer As String, ByVal StrDatabase As String, ByVal strUsername As String, ByVal strPassword As String)
 _Server = StrServer
 _Database = StrDatabase
 _Username = strUsername
 _Pass = strPassword 
 ChuoiKetNoi = "server=" & strServer & ";" & _ 
"uid="& strUsername & ";pwd="& strPassword & ";database=" & strDatabase
 MsSql = Class_KieuDL.sql 
 End Sub
 Public Sub New(ByVal StrServer As String, ByVal StrDatabase As String, Optional ByVal strUsername As String = "sa")
 _Server = StrServer 
 _Database = StrDatabase 
 _Username = strUsername 
 _Pass = ""
 ChuoiKetNoi = "server=" & strServer & ";" & _
"uid=" & strUsername & ";database=" & strDatabase
 MsSql = Class_KieuDL.sql 
 End Sub 
 Public Sub ChuoiKetnoiSQL()
        ChuoiKetNoi = "server=" & _server & ";" & _
             "uid=" & _username & ";pwd=" & _pass & ";database=" & _DataBase
        If _pass = "" Then
            ChuoiKetnoiSQL_NotPass()
            If _username = "" Then
                ChuoiKetnoiSQL_NotPass1()
            End If
        End If
 End Sub
 Public Sub ChuoiKetnoiSQL_NotPass()
 ChuoiKetNoi = "server="& _Server & ";" & _
"uid=" & _Username & ";database=" & _Database
 End Sub
 Public Sub ChuoiKetnoiSQL_NotPass1() 
        ChuoiKetNoi = " server=" & _server & ";database=" & _DataBase & ";integrated security=true;"
 End Sub 
 #End Region
 End Class
